Optimal. Leaf size=18 \[ -\log (x)-i \tan (a+i \log (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3554, 8}
\begin {gather*} -\log (x)-i \tan (a+i \log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3554
Rubi steps
\begin {align*} \int \frac {\tan ^2(a+i \log (x))}{x} \, dx &=\text {Subst}\left (\int \tan ^2(a+i x) \, dx,x,\log (x)\right )\\ &=-i \tan (a+i \log (x))-\text {Subst}(\int 1 \, dx,x,\log (x))\\ &=-\log (x)-i \tan (a+i \log (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 28, normalized size = 1.56 \begin {gather*} i \text {ArcTan}(\tan (a+i \log (x)))-i \tan (a+i \log (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 24, normalized size = 1.33
method | result | size |
norman | \(-\ln \left (x \right )-i \tan \left (a +i \ln \left (x \right )\right )\) | \(17\) |
risch | \(-\ln \left (x \right )+\frac {2}{1+\frac {{\mathrm e}^{2 i a}}{x^{2}}}\) | \(21\) |
derivativedivides | \(-i \left (\tan \left (a +i \ln \left (x \right )\right )-\arctan \left (\tan \left (a +i \ln \left (x \right )\right )\right )\right )\) | \(24\) |
default | \(-i \left (\tan \left (a +i \ln \left (x \right )\right )-\arctan \left (\tan \left (a +i \ln \left (x \right )\right )\right )\right )\) | \(24\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.47, size = 17, normalized size = 0.94 \begin {gather*} i \, a - \log \left (x\right ) - i \, \tan \left (a + i \, \log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 30 vs. \(2 (14) = 28\).
time = 3.76, size = 30, normalized size = 1.67 \begin {gather*} -\frac {{\left (x^{2} + e^{\left (2 i \, a\right )}\right )} \log \left (x\right ) + 2 \, e^{\left (2 i \, a\right )}}{x^{2} + e^{\left (2 i \, a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.17, size = 22, normalized size = 1.22 \begin {gather*} - \log {\left (x \right )} - \frac {2 e^{2 i a}}{x^{2} + e^{2 i a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 17, normalized size = 0.94 \begin {gather*} i \, a - \log \left (x\right ) - i \, \tan \left (a + i \, \log \left (x\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.38, size = 16, normalized size = 0.89 \begin {gather*} -\ln \left (x\right )-\mathrm {tan}\left (a+\ln \left (x\right )\,1{}\mathrm {i}\right )\,1{}\mathrm {i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________